'use strict';

const { timeStamp } = require("console");

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;
    router.get('/', controller.home.index);
    router.post('/jpy', controller.home.jpy);
    router.put('/xidian', controller.home.xidian);
    // 用户注册
    router.post('/register',controller.xzwy.register);
    // 用户登录
    router.post('/login',controller.xzwy.login);
    // 随机查询一条贴士
    router.get('/tips',controller.xzwy.tips);
    // 上传日记
    router.post('/diary',controller.xzwy.diary);
    // 查询日记
    router.get('/diary',controller.xzwy.diary_Inquire);
    // 用户数据库的增删改查操作
    router.post('/create',controller.mysqltest.create);
    router.get('/read',controller.mysqltest.read);
    router.get('/update',controller.mysqltest.update);
    router.get('/delete',controller.mysqltest.delete);
    //Todo
    router.get('/todo',controller.todo.add);
    router.delete('/todo',controller.todo.delete);
    router.put('/todo',controller.todo.update);
    router.get('/todo/list',controller.todo.read);
    router.get('/todo/check',controller.todo.check);
    router.get('/todo/default', controller.todo.default);
    //日历
    router.get('/calendar', controller.calendar.read);
    // 反馈
    router.post('/feedback',controller.xzwy.feedback);

};
